#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2019 crane <crane@gosun>
#
# Distributed under terms of the MIT license.


"""
https://www.lintcode.com/problem/singleton/description
"""


class Solution:
    # @return: The same instance of this class every time
    init = False
    inst = None

    @classmethod
    def getInstance(cls):
        if not cls.init:
            cls.init = True
            cls.inst = cls()

        return cls.inst


def test():
    v = Solution.getInstance()
    print(v)
    # s.

    v = Solution.getInstance()
    print(v)

def main():
    print("start main")
    test()

if __name__ == "__main__":
    main()
